[YouTube] Don't throw an exception when there is no banner available on a channel#1086
Merged
TobiGr merged 2 commits intoTeamNewPipe:devfrom Aug 2, 2023
Merged
Conversation
…on a channel Channels may not have a banner, so no exception should be thrown if no banner is found.
|
Build and test is failing on CI. Also you may have to explicitly add reviewers on your PR to get approvals |
Member
Author
|
The test failures are unrelated to this PR (Bandcamp service) and are already fixed by #1082. About reviews, team members working on the extractor look at PRs without having to request a review. |
TobiGr
approved these changes
Aug 2, 2023
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I tested my changes by using a temporary unit test with the channel from which the issue has been found and another one with which the issue was reproducible (see below).
On YouTube, channels may not have a banner, so no exception should be thrown if no banner is found. This PR makes
YoutubeChannelExtractor.getBannerUrlreturningnullwhen there is no banner instead of throwing aParsingException, like it was the case before (the current behavior has been introduced in #1050).As
carouselHeaderRenders do not contain a banner, I tested this behavior in the corresponding test method and test class (testBannerUrlinYoutubeChannelExtractorTest.CarouselHeader).This bug has been originally reported in this comment in the issue of NewPipe v0.25.2's release.